<?php
require_once(dirname(__FILE__) . "/start.inc");

$username = getVar('username');
$password = getVar('password');

// TODO: Verify login

$user = new User(1);

$result = array();
$result['result'] = false;

if ($user) {
	$_SESSION['user'] = $user;
    $result['content'] = get_include_contents(dirname(__FILE__).'/views/login_block.php');
	$result['result'] = true;
}

echo json_encode($result);

